use std::path::PathBuf;
use structopt::StructOpt;

#[derive(Debug, StructOpt)]
#[structopt(name = "Sommi", about = "Log analyzer")]
pub struct Opt {
    /// Activate debug mode
    #[structopt(short, long)]
    debug: bool,

    /// Input file
    #[structopt(short, long, parse(from_os_str))]
    input: PathBuf,
}

impl Opt {
    pub fn new() -> Self {
        Opt::from_args()
    }

    pub fn file(&self) -> &PathBuf {
        &self.input
    }
}
